package com.miya.demo.model.dto.system;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

/**
 * 用户dto
 *
 * @author Caixiaowei
 * @date 2022/08/18
 */
@Data
public class UserAddOrUpdateDTO implements Serializable {
    private static final long serialVersionUID = 4708991142082118575L;

    @ApiModelProperty("用户id")
    private Long id;

    @ApiModelProperty("用户名")
    @NotEmpty(message = "用户名不能为空")
    private String username;

    @ApiModelProperty("密码")
    @NotEmpty(message = "密码不能为空")
    private String password;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("电话")
    private String phone;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("性别: 0-保密; 1-男; 2-女")
    private Integer gender;

    @ApiModelProperty("用户角色集合")
    private List<Long> roles;
}
